package api

import (
	"gitee.com/liuxiaowei123/vblog-1.1/app/blog"
	"gitee.com/liuxiaowei123/vblog-1.1/ioc"
)

const AppName = "blogapihandler"

type BlogApiHandler struct {
	blogsvc blog.BlogService
}

func init() {
	ioc.IocApiHandler().Registry(&BlogApiHandler{})
}

func (b *BlogApiHandler) Init() {
	b.blogsvc = ioc.IocController().Get(blog.AppName).(blog.BlogService)
}

func (b *BlogApiHandler) Name() string {
	return AppName
}
